li = [1,3,5,4,12,6,7,4]

t = sorted(li)

for i,a in enumerate(li):
  li[i] = t.index(a)
  t[t.index(a)] =  -1

for i in li:
  print(i+1)


